#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>

#include "../ec_it8733_inc/ec_it8733_dev.h"

/* seconddrvtest 
  */

unsigned char dev_inb(int fd, unsigned short int port)
{
	typEcDev ecdev;
	ecdev.port=port;
	if(ioctl(fd,EC_DEV_BYTE_IN,&ecdev)==0)
		return ecdev.value;
	return 0xFF;
}

void dev_outb(int fd, unsigned char value, unsigned short int port)
{
	typEcDev ecdev;
	ecdev.port=port;
	ecdev.value=value;

	ioctl(fd,EC_DEV_BYTE_OUT,&ecdev);
}
#if 0
void dev_test(int fd, unsigned char value, unsigned short int port)
{
	typEcDev ecdev;
	ecdev.port=port;
	ecdev.value=value;

	ioctl(fd,EC_DEV_TEST,&ecdev);
}
#endif


